<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../../favicon.ico">

    <title>{{ index.name }}</title>

    <!-- Bootstrap core CSS -->
    <link href="/node_modules/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Custom styles for this template -->
    <link href="/public/css/dashboard.css" rel="stylesheet">
</head>

<body>

    <nav class="navbar navbar-inverse navbar-fixed-top">
        <div class="container-fluid">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
                    aria-expanded="false" aria-controls="navbar">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="/yhf">{{ index.name }}</a>
            </div>
            <div id="navbar" class="navbar-collapse collapse">
                <ul class="nav navbar-nav navbar-right">
                    <li><a href="#">设置</a></li>
                    <li><a href="#">登录</a></li>
                    <li><a href="#">帮助</a></li>
                </ul>
                <form class="navbar-form navbar-right">
                    <input type="text" class="form-control" placeholder="请输入要查找的内容">
                </form>
            </div>
        </div>
    </nav>

    <div class="container-fluid">
        <div class="row">
            <div class="col-sm-3 col-md-2 sidebar">
                <ul class="nav nav-sidebar">
                    <li class="active"><a href="/yhf">系统成员列表 <span class="sr-only">(current)</span></a></li>
                    <li><a href="#">Reports</a></li>
                    <li><a href="#">Analytics</a></li>
                    <li><a href="#">Export</a></li>
                </ul>
                <ul class="nav nav-sidebar">
                    <li><a href="">Nav item</a></li>
                    <li><a href="">Nav item again</a></li>
                    <li><a href="">One more nav</a></li>
                    <li><a href="">Another nav item</a></li>
                    <li><a href="">More navigation</a></li>
                </ul>
                <ul class="nav nav-sidebar">
                    <li><a href="">Nav item again</a></li>
                    <li><a href="">One more nav</a></li>
                    <li><a href="">Another nav item</a></li>
                </ul>
            </div>
            <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
                <h1 class="page-header">系统排名前4名</h1>

                <div class="row placeholders">
                    {{ each yhf }}
                    {{ if $index<4 }} <div class="col-xs-6 col-sm-3 placeholder">
                        <img src=""
                            width="200" height="200" class="img-responsive" alt="Generic placeholder thumbnail">


                        <h4>{{ yhf[$index].name }}</h4>

                        <span class="text-muted">Something else</span>
                </div>
                {{ /if }}
                {{ /each }}
            </div>


            <h2 class="sub-header">系统成员列表</h2>
            <a class="btn btn-success" href="/yhf/new">添加成员</a>
            <div class="table-responsive">
                <table class="table table-striped">
                    <thead>
                        <tr>
                            <th>#</th>
                            <th>姓名</th>
                            <th>性别</th>
                            <th>年龄</th>
                            <th>爱好</th>
                            <th>管理员</th>
                        </tr>
                    </thead>
                    <tbody>
                        {{ each yhf }}
                        <tr>
                            <td>{{ $index + 1}}</td>
                            <td>{{ $value.name }}</td>
                            {{ if $value.gender===0 }} <td>男</td> {{ /if }}
                            {{ if $value.gender===1 }} <td>女</td> {{ /if }}
                            <td>{{ $value.age }}</td>
                            <td>{{ $value.hobbies }}</td>
                            <td>{{ $value.admin }}</td>
                            <td>
                                <a href="/yhf/edit?id={{ $value._id }}">编辑</a>
                                <a href="/yhf/delete?id={{ $value._id }}">删除</a>
                            </td>
                        </tr>
                        {{ /each }}
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    </div>
</body>

</html>